package top.whysu.rongcloud.constant;

/**
 * @author
 * @version
 * @description 响应码常量类
 * @copyright
 * @company
 * @date
 */
public class CodeConstant {
    /**
     * 通用校验异常码
     */
    public static final class Http {
        /**
         * 成功
         */
        public static final int SUCCESS = 200;
        /**
         * 失败
         */
        public static final int FAIL = 100;
        /**
         * 鉴权失败
         */
        public static final int AUTHORIZATION_FAIL = 401;
        /**
         * 参数检验失败
         * [非空，长度，类型，格式等异常]
         */
        public static final int PARAM_ERROR = 407;
    }

    /**
     * 通用校验（1001-2000）
     */
    public static final class Common {
        /**
         * 图片上传失败
         */
        public static final int FILE_UPLOAD_FAIL = 1001;
    }

    /**
     * 融云相关异常段（2001-3000）
     */
    public static final class RongCloud {
        /**
         * 账号不存在
         */
        public static final int ACCOUNT_NOT_EXIST = 2001;
        /**
         * 你们已经是好友了
         */
        public static final int ALREADY_FRIEND = 2002;
        /**
         * 无效的好友请求，或者未知好友
         */
        public static final int UNKNOW_FRIEND = 2003;
        /**
         * 你们不是好友关系,不能执行相关操作
         */
        public static final int REJECT_OPERATION = 2004;
        /**
         * 好友请求已发送，等待对方回应
         */
        public static final int WAITING_RESPONSE = 2005;
        /**
         * 操作群组失败
         */
        public static final int GROUPS_OPERATE_FAIL = 2006;
        /**
         * 群组不存在
         */
        public static final int GROUPS_NOT_EXIST = 2007;
        /**
         * 无权限操作群组
         */
        public static final int GROUPS_REJECT_OPERATION = 2008;
        /**
         * 你已经在群组中
         */
        public static final int GROUPS_ALREADY_EXIST = 2009;
    }

}